SRC: detect all-zero Y columns in GEDMD scaling#1243
SRC: detect all-zero Y columns in GEDMD scaling#1243nakatamaho wants to merge 1 commit intoReference-LAPACK:masterfrom
Conversation
Add the missing all-zero column check to the JOBS='Y' scaling path in the GEDMD routines. The existing JOBS='S'/'C' path detects when all columns of X are zero and returns INFO=-8, but the corresponding JOBS='Y' path did not count zero columns of Y or return early when all Y columns are zero. Return INFO=-10 for the all-zero Y case, matching Y as the 10th argument and the existing SCCOLY error handling. Update the routine documentation to describe this condition.
|
From: Zlatko Drmac First a summary:
However, if scaling options are active, the subroutine uses the opportunity to check for some inconsistencies - like all If scaling of So, this is something I call "a political decision" - the roles of So, I would say it is OK to return an error code if (For So, in the end, it is a "political decision" 😀 |
|
From: Zlatko Drmac It is indeed important to discuss all aspects of such "singularities". Well designed behaviour for singular cases may save the day in mission critical applications. If |
This PR adds the missing all-zero column check to the
JOBS='Y'scaling path in the GEDMD routines.
In the existing implementation, the
JOBS='S'/JOBS='C'pathnormalizes the columns of
Xand counts zero columns while doing so.If all columns of
Xare zero, the routine returns early withINFO = -8, sinceXis the 8th argument.The corresponding
JOBS='Y'path normalizes the columns ofY, but itdid not count zero columns of
Yand therefore did not return earlywhen all columns of
Ywere zero. This made the handling of theSCCOLYpath asymmetric with the existingSCCOLXpath.This PR updates the
JOBS='Y'path to:YYYare zeroINFO = -10, matchingYas the 10th argumentUpdated routines:
SRC/sgedmd.f90SRC/dgedmd.f90SRC/cgedmd.f90SRC/zgedmd.f90This is intended to make the input validation and scaling behavior of
the
JOBS='Y'path consistent with the existingJOBS='S'/JOBS='C'path. It also avoids continuing the computation after detecting that
the requested
Y-based column scaling cannot be performed because allcolumns of
Yare zero.